package com.youhome.service.service;

import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.BUserRole;
import com.youhome.service.model.Contacts;
import com.youhome.service.model.BUser;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by chen365 on 2017/10/19.
 */
public interface BUserService {
    BUser getCurrentUser(String openid);

    BUser create(BUser user);

    int create(BUserRole userRole);

    BUser getCurrentUser();

    BUser selectByPhone(String phone);

    Boolean isExistByPhone(String phone);

    PageInfo<Contacts> selectContactsByCompanyId(Integer page, Integer pageSize, Long companyId);

    Long getCompanyId();

    int updateReportCount(Integer count, Long id) throws Exception;

    int findRepotCountById(Long id) throws Exception;

    int updateByPrimaryKeySelective(BUser entity);

    void logout(HttpServletRequest request, HttpServletResponse response);

    int selectReportCount() throws CustomException;
}
